﻿using Calligraphy.CalligraphyData;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Calligraphy.DataModel
{
    class StelePaperDataSource
    {
        T_StelePaper _stelePaper;
        public void LoadRubbings(T_StelePaper stelePaper)
        {
            _stelePaper = stelePaper;
            var q = from r in DataServiceContextHelper.DataContext.T_Rubbing.Expand("T_Dynast").Expand("T_Photo").Expand("T_StelePaper") where r.StelePaperID == stelePaper.ID && (r.IsDeleted == null || r.IsDeleted == false) select r;
            stelePaper.T_Rubbing.LoadAsync(q);
        }
    }
}
